<!DOCTYPE html>

<html lang='en'>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/react.development16.4.0.js"></script>
    <script src="./lib/react-dom.development16.4.0.js"></script>
    <script src="./lib/babel.min.js"></script>
    <script src="./lib/prop-types.js"></script>
    
</head>

<body>
    <div id="app">
    </div>
    <script type="text/babel">
        class MyCom extends React.Component {
            render() {
                return (
                    <div>
                        <ul>
                          <li>{this.props.name}</li>
                          <li>{this.props.age}</li>
                          <li>{this.props.sex}</li>
                        </ul>
                    </div>
                )
            }
        }
       
        MyCom.propTypes={
            name: PropTypes.string.isRequired,
            age:  PropTypes.number.isRequired,
            sex:  PropTypes.string.isRequired
        }
         
        var person = {
           name:"丽水",
           age:18,
           sex:"男" 
        }


        const el = <MyCom name={person.name} age={person.age} sex={person.sex} />

        ReactDOM.render(
            el,document.getElementById('app')
        );
    </script>
</body>

</html>